package com.yunlinker.asba.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class MyHelper extends SQLiteOpenHelper {
	
	private static String DB_NAME = "mydata.db";  //���ݿ�����
	public static String TABLE_NAME = "img_table"; //����
	
	public MyHelper(Context context) {
		super(context, DB_NAME, null, 2);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		//Create table
		String sql = "CREATE TABLE "+TABLE_NAME + "("
					  + "_id INTEGER PRIMARY KEY,"
					  + "url TEXT,"
				      + "urldate BLOB,"
				      + "urltime INTEGER,"
				      + "urlsize INTEGER);";

		Log.e("table oncreate", "create table");
		db.execSQL(sql); 		//������
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		Log.e("update", "update");
//		db.execSQL("ALTER TABLE "+ MyHelper.TABLE_NAME+" ADD sex TEXT"); //�޸��ֶ�


	}

}
